package com.kgcx.common.client.coupon;

import com.kgcx.common.client.coupon.pojo.Coupon;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(name = "coupon")
public interface CouponClient {
    @GetMapping("coupon/queryUsableCoupon")
    List<Coupon> queryUsableCoupon(@RequestParam("customerId") Long customerId,
                                   @RequestParam("pageNum") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam("vehiclePurposeOot") Long vehiclePurposeOot,
                                   @RequestParam("availableCityOot") Long availableCityOot, @RequestParam("orderTypeOot") Long orderTypeOot, @RequestParam("fareTypeOot") Long fareTypeOot,
                                   @RequestParam("orderChannelOot") Long orderChannelOot, @RequestParam("useTypeOot") Long useTypeOot, @RequestParam("triggerLe") Long triggerLe, @RequestParam("planDepartTime") Long planDepartTime);

    @GetMapping("coupon/queryUsableCouponByOrderNo")
    List<Coupon> queryUsableCouponByOrderNo(@RequestParam("orderNo") String orderNo, @RequestParam(name = "trigger", required = false) Long trigger);

    @GetMapping("coupon/getCouponInfo")
    Coupon getCouponInfo(@RequestParam("kid") Long kid);

    @PostMapping("coupon/updateCouponState")
    void updateCouponState(@RequestParam("couponId") Long couponId, @RequestParam("state") Long state);

}
